package cn.com.yusys.yusp.custManager.web.rest;

import cn.com.yusys.yusp.custManager.domain.OcrmFCiFqScol;
import cn.com.yusys.yusp.custManager.service.FlexibleQueryConService;
import cn.com.yusys.yusp.commons.service.CommonService;
import cn.com.yusys.yusp.commons.web.rest.CommonResource;
import cn.com.yusys.yusp.commons.web.rest.dto.ResultDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: zoie
 * @Description: 灵活查询条件
 * @Date: 2021/5/1
 * @Version: 1.0
 */
@RestController
@RequestMapping("/api/flexibleQueryCon")
@Api(tags = "flexibleQuery")
public class FlexibleQueryConResource extends CommonResource<OcrmFCiFqScol,String> {
    @Autowired
    private FlexibleQueryConService flexibleQueryConService;

    public FlexibleQueryConResource(FlexibleQueryConService service) {
        super();
        this.flexibleQueryConService =service;
        // TODO Auto-generated constructor stub
    }
    private final Logger log = LoggerFactory.getLogger(FlexibleQueryConResource.class);

    @Override
    protected CommonService getCommonService() {
        // TODO Auto-generated method stub
        return this.flexibleQueryConService;
    }

    /**
     * @方法名称: getScol
     * @方法描述: 查询条件
     * @参数与返回说明:
     * @算法描述:
     */
    @GetMapping("/getSCol")
    @ApiOperation(value = "查询条件", notes = "查询条件")
    public ResultDto<List<Map<String, Object>>> getSCol(String ssId) {
        List<Map<String, Object>> list = flexibleQueryConService.getSCol(ssId);
        return new ResultDto<>(list);
    }
    @GetMapping("/getUuid")
    public ResultDto<Map<String, String>> getUuid(String orgCode) {
        Map<String, String> mapuuid = this.flexibleQueryConService.getUuid(orgCode);
        return new ResultDto<>(mapuuid);
    }

}



